package cn.hdu.liang.initialization;

public class NewVarArgs {
    static void printArray(Object... args) {
        for(Object obj : args) {
            System.out.printf(obj + " ");
        }
        System.out.println();
    }

    public static void main(String[] args) {
        printArray(new Integer(47), new Float(3.14), new Double(1.43));
        printArray(23, 43.2F, 12.4);
        printArray("one", "two", "three");
        printArray();
        printArray((Object[]) new Integer[]{1, 2, 3, 4});
    }
}
